-- GENERATED SPELL FOR [Smolderthorn Shadow Priest] --


function spell0_9240(pUnit, Event) --@Dispel Magic,n/a--
pUnit:FullCastSpellOnTarget(15090,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9240', 566, 1)
end

function spell1_9240(pUnit, Event) --@Hex,n/a--
pUnit:FullCastSpellOnTarget(11641,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9240', 10289, 1)
end

function spell2_9240(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(15800,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9240', 3000, 1)
end

function Sorts_9240(pUnit, Event)
local choix_sorts_9240 = math.random(0, 2)
if choix_sorts_9240 == 0 then
pUnit:RegisterEvent('spell0_9240', 1, 1)
end
if choix_sorts_9240 == 1 then
pUnit:RegisterEvent('spell1_9240', 1, 1)
end
if choix_sorts_9240 == 2 then
pUnit:RegisterEvent('spell2_9240', 1, 1)
end
end

function mob9240_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9240', math.random(1500, 3000), 1)
end

function mob9240_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9240_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9240_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9240, 1, 'mob9240_Action')
RegisterUnitEvent(9240, 2, 'mob9240_Leave')
RegisterUnitEvent(9240, 3, 'mob9240_Kill')
RegisterUnitEvent(9240, 4, 'mob9240_Die')
